<template>
  <div class="tiele">
    <van-grid square :column-num="5" :border="false" icon-size="50px">
      <van-grid-item
        to="/product"
        v-for="item in list"
        :key="item.name"
        :icon="item.imgUrl"
        :text="item.name"
      />
    </van-grid>
  </div>
</template>

<script>
import { homeCategory } from "../../../api";
export default {
  data() {
    return {
      list: [],
    };
  },
  created() {
    homeCategory((res) => {
      this.list = res.data;
    });
  },
};
</script>

<style lang="scss" scoped>
</style>